﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class HouseArchivement : PageBase
{
    public DateTime dtYesterday;
    protected void Page_Load(object sender, EventArgs e)
    {
        dtYesterday = DateTime.Now.AddDays(-1);
        //日期检索条件
        string strLsData = string.Format("{{Yesterday:\"{0}\",CurStartWeekDay:\"{1}\",CurEndWeekDay:\"{2}\",CurStartMonth:\"{3}\",CurEndMonth:\"{4}\"}}",
                                         dtYesterday.ToString("yyyy-MM-dd"),//昨日
                                         DateTime.Now.AddDays(Convert.ToDouble(0 - Convert.ToInt16(DateTime.Now.DayOfWeek))).Date.ToString("yyyy-MM-dd"),//本周日
                                         DateTime.Now.AddDays(Convert.ToDouble(6 - Convert.ToInt16(DateTime.Now.DayOfWeek))).Date.ToString("yyyy-MM-dd"),//本周末
                                         DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).Date.ToString("yyyy-MM-dd"),//本月初
                                         DateTime.Parse(DateTime.Now.ToString("yyyy-MM-01")).AddMonths(1).AddDays(-1).Date.ToString("yyyy-MM-dd")//本月末
                                         );
        lsDate.Value = strLsData;
    }
}
